package com.sne.airways.basecore.aspectj;

import com.sne.airways.basecore.exceptions.AppException;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;

/**
 * Created by IntelliJ IDEA.
 * User: 卞京帅{bjslogin#gmail.com}
 * Date: 12-11-11
 * Time: 上午9:18
 * * 拦截系统异常，发送错误报告邮件
 * */
@Aspect
public class ExceptionSenderAspect {

    private ExceptionSenderAspect() {
    }

    @AfterThrowing(pointcut = "SystemPointcuts.servicePointcut()",throwing = "e",argNames = "e")
    public void senderException(Exception e){
        if(e instanceof AppException)
            return ;
        // start send mail
    }

}
